/*
 * 图片预览组件DuImageView的hooks
 */
export function useImagePreview() {
  // DuImageView组件的ref
  const iviewRef = ref(null)

  // 打开图片预览的方法，第index张图片
  const showImageView = (index) => {
    iviewRef.value.openPreview()
    iviewRef.value.setIndex(index)
  }
  return {
    iviewRef,
    showImageView,
  }
}
